import matplotlib.pyplot as plt
import numpy as np
import matplotlib.patches as patches       

canvas, ax = plt.subplots()
ax.set_xlim(-0.5, 6 - 0.5)
ax.set_ylim(-0.5, 6 - 0.5)
ax.xaxis.set_ticks(np.arange(-0.5, 6, 1))     
ax.yaxis.set_ticks(np.arange(-0.5, 6, 1))   
ax.grid(True, linestyle="-", color="gray", linewidth="1", axis='both')
ax.set_aspect('equal')
ax.invert_yaxis()
ax.xaxis.set_ticks_position('top')      
idx_labels_x = [i for i in range(36)]

for lb in idx_labels_x:
    ax.text(lb % 6, lb // 6, str(lb+1), size=10, ha='center', va='center', color='black')           
# ax.tick_params(bottom=False, left=False, right=False, top=False, labelbottom=False, labelleft=False,labeltop=False) 
target_rect = patches.Rectangle( (4-0.5,4-0.5), 1, 1, linewidth=1, edgecolor=(0.3010,0.7450,0.9330), facecolor=(0.3010,0.7450,0.9330))
ax.add_patch(target_rect)
plt.show()